package com.leen.video.entity;


import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 定时任务日志
 * </p>
 *
 * @author cm
 * @since 2021-05-19
 */
@Setter
@Entity
@Getter
@Table(name = "quartz_log")
@ApiModel(value="QuartzLog对象", description="定时任务日志")
@ToString(callSuper = true)
public class QuartzLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;

    @Column(name = "baen_name")
    private String baenName;

    @Column(name = "create_time")
    private Date createTime;

    @Column(name = "cron_expression")
    private String cronExpression;

    @Column(name = "exception_detail")
    private String exceptionDetail;

    @Column(name = "is_success")
    private Boolean isSuccess;

    @Column(name = "job_name")
    private String jobName;

    @Column(name = "method_name")
    private String methodName;

    @Column(name = "params")
    private String params;



    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JSONField(format = "yyyy/MM/dd HH:mm:ss")
    @Column(name = "time")
    private Long time;


    @DateTimeFormat(pattern = "yyyy/MM/dd HH:mm:ss")
    @JSONField(format = "yyyy/MM/dd HH:mm:ss")
    @Column(name = "update_time")
    private Date updateTime;

    @Column(name = "is_del")
    private Integer isDel;


}
